﻿using System;
using System.Collections.Generic;
using System.Text;
using FIRADriverLibrary;
using Geometry;

namespace PotentialFieldDriver.RobAgentSoccer
{
    class RobAgentAtack : RobAgent
    {
        public override void Refresh()
        {
            BasicRefresh();
            if (gameState == GameState.Play)
            {
                bruteAttack();
            }
        }

        public void bruteAttack()
        {
            foreach (RobotController robotController in robotControllers)
            {
                double speedVector = target.GetDistance(robotController.robotState.x, robotController.robotState.y) / PotencialDriver.maxVelocity;
                PotencialDriver.Drive(robotController, target.x, target.y, speedVector);
            }


        }
    }
}
